#ifndef WEBCOMMUNICATION_H
#define WEBCOMMUNICATION_H

#include <QObject>
#include <QMessageBox>

class WebCommunication : public QObject
{
    Q_OBJECT

    // 定义类的属性，使其可以被元对象系统识别,使其能够在QML中使用，进行属性绑定和信号槽连接等操作
    // 属性名称: mPositioning 是属性的名称，
    // NOTIFY: 这个关键字用于指定一个信号，当属性的值发生变化时会发出这个信号

    Q_PROPERTY(QString mPositioning MEMBER m_jsPositioningData NOTIFY signalPositioning)
    Q_PROPERTY(QString mMouseClick MEMBER m_jsMouseClickPositioinData NOTIFY signalMouseClick)

public:
    QString& getJsBackData();
    QString& getJsClickData();

signals:
    void signalPositioning();
    void signalMouseClick();

public slots:
    void jscallme();

private:
    QString m_jsPositioningData;
    QString m_jsMouseClickPositioinData;
};

#endif // WEBCOMMUNICATION_H
